﻿@page "/speechs"
@namespace BootstrapBlazor.Shared.Samples
@inherits BootstrapComponentBase
@layout MainLayout

<h3>@Localizer["H1"]</h3>

<h4>@Localizer["H2"]</h4>

<p>@Localizer["P1"] <code>Azure</code> @Localizer["P2"] <code>Baidu</code> @Localizer["P3"] <a href="https://www.nuget.org/packages?q=@NugetPackageName" target="_blank"><code>@NugetPackageName</code></a>，@Localizer["P4"]</p>

<PackageTips Name="@NugetPackageName"></PackageTips>

<div class="code-label mb-2">@Localizer["P9"]</div>

<ul class="ul-demo">
    <li>@Localizer["P10"] <b>@Localizer["P11"]</b> @Localizer["P12"]：<b><i>@Localizer["P13"]</i></b></li>
    <li>@Localizer["P14"] <b><i>@Localizer["P15"]</i></b></li>
    <li>@Localizer["P16"]：<b><i>@Localizer["P17"]</i></b></li>
    <li>@Localizer["P18"] <b>@Localizer["P19"]</b> @Localizer["P20"]</li>
</ul>

<div class="row">
    <div class="col-12 col-sm-auto">
        <Button Text="@Localizer["P21"]" Icon="fa-fw fa-solid fa-microphone" OnClick="OnStart" style="margin: 1.5rem 0;" />
    </div>
    <div class="col-12 col-sm-auto">
        <SpeechWave Show="Show" TotalTime="@TotalTime" class="my-3" />
    </div>
</div>

<GroupBox Title="@Localizer["P22"]">
    <BootstrapBlazor.Components.Console HeaderText="@Localizer["P23"]" Items="@ConsoleMessages" Height="140" />
</GroupBox>

<div class="code-label mt-3 mb-2">@Localizer["P24"]</div>

<div class="mb-2"><b>Program.cs</b></div>

<Pre>// @Localizer["P25"]
<b><i>builder.Services.AddBootstrapBlazorBaiduSpeech();</i></b></Pre>

<div class="code-label mb-2">@Localizer["P26"]</div>

<Pre>// @Localizer["P27"]
[Inject]
[NotNull]
private RecognizerService? RecognizerService { get; set; }

// @Localizer["P28"]
[Inject]
[NotNull]
private SynthesizerService? SynthesizerService { get; set; }</Pre>
